<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>支出</title>
    <link rel="stylesheet" href="../../layuimini/lib/layui-v2.6.3/css/layui.css" media="all">
</head>


<body>

<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="insert">新建</button>
    </div>
</script>
<script type="text/html" id="bar">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">×</a>
</script>

<table class="layui-hide" id="financial" lay-filter="financial"></table>

</body>

<script src="../../layuimini/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="../../layuimini/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="../../layuimini/lib/jq-module/jquery.particleground.min.js" charset="utf-8"></script>
<script>
    let url = '../../FinancialInServlet';

    /**
     * 显示数据
     */
    layui.use('table', function ()
    {
        let table = layui.table;

        table.render(
            {
                elem: '#financial',
                url: url,
                method: 'post',
                page: true,
                title: '应收账款',
                defaultToolbar: [],
                cols: [[
                    {field: 'id', title: '编号', sort: true, fixed: 'left'},
                    {field: 'debit_count', title: '借方数目(元)'},
                    {field: 'lender_count', title: '货方数目(元)'},
                    {field: 'count', title: '总计(元)'},
                    {field: 'date', title: '日期', sort: true, fixed: 'right'},
                ]]
            }
        )
    });
</script>

</html>